/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.departement;

import java.util.List;

/**
 *
 * @author User
 */
public class DepartementServiceImpl implements DepartementService {

    private DepartementDAO departementDAO;

    public void setDepartementDAO(DepartementDAO departementDAO) {
        this.departementDAO = departementDAO;
    }

    public void saveDepartement(Departement departement) throws Exception {
        this.departementDAO.save(departement);
    }

    public void deleteDepartement(Departement departement) throws Exception {
        this.departementDAO.delete(departement);
    }

    public void updateDepartement(Departement departement) throws Exception {
        this.departementDAO.update(departement);
    }

    public List loadAll() throws Exception {
        return this.departementDAO.getAll(Departement.class);
    }

    public Departement loadById(long id) throws Exception {
        return (Departement) this.departementDAO.load(Departement.class, id);
    }
}
